package com.upay.android.controller.activity;

import android.app.Fragment;
import android.os.Bundle;

import com.upay.android.R;

public abstract class SingleFragmentActivity extends FragmentActivity {
    
	/* ---- Constants ---- */
	
	/* ---- Instance Variables ---- */
	

	/* ---- Constructors ---- */
	
	/* ---- Business Methods ---- */

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Fragment fragment = getFragmentManager().findFragmentById(R.id.fragmentContainer);
        if (fragment == null) { fragment = createFragment(); }       
        addFragment(R.id.fragmentContainer, fragment);
    }
    
     
	protected abstract Fragment createFragment();

}
